#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
char teststring;
void setup() {
 Serial.begin(9600);   //串口和Arduino之间的通信
 lcd.init();                  // 初始化LCD
 lcd.backlight();             //设置LCD背景等亮
   }
void loop() {
  int cnt = 0;
 while(Serial.available()>0){
   teststring = Serial.read();
   Serial.println(teststring);
   lcd.print(teststring);
   cnt++;
   delay(100);
   if(cnt==5)
   {
    lcd.clear();
    cnt = 0; 
   }
  }
}
